home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Apple Location Manager / ALMInterfaces / LocationManager.k.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-18  |  2.5 KB  |  91 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        LocationManager.k.h
  3.  
  4.     Contains:    LocationManager (manange preferences for different physical locations)
  5.  
  6.      Version:    System 7.6
  7.                  Package:    Location Manager SDK 1.0
  8.  
  9.      Copyright:    © 1984-1997 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@apple.com
  16.  
  17. */
  18.  
  19. #ifndef __LOCATIONMANAGER_K__
  20. #define __LOCATIONMANAGER_K__
  21.  
  22. #include <LocationManager.h>
  23.  
  24. /*
  25.     Example usage:
  26.  
  27.         #define ALM_BASENAME()    Fred
  28.         #define ALM_GLOBALS()    FredGlobalsHandle
  29.         #include <LocationManager.k.h>
  30.  
  31.     To specify that your component implementation does not use globals, do not #define ALM_GLOBALS
  32. */
  33.  
  34.  
  35. #ifndef ALM_BASENAME
  36.     #error ALM_BASENAME must be defined to use this file
  37. #endif
  38.  
  39. #ifndef ALM_GLOBALS
  40.     #define ALM_GLOBALS() 
  41.     #define ADD_ALM_COMMA 
  42. #else
  43.     #define ADD_ALM_COMMA ,
  44. #endif
  45.  
  46. #define ADD_ALM_BASENAME(name) ALM_BASENAME()##name
  47.  
  48. extern pascal ComponentResult ADD_ALM_BASENAME(GetCurrent) 
  49.         (ALM_GLOBALS() ADD_ALM_COMMA Handle setting);
  50.  
  51. extern pascal ComponentResult ADD_ALM_BASENAME(SetCurrent) 
  52.         (ALM_GLOBALS() ADD_ALM_COMMA Handle setting, ALMRebootFlags* flags);
  53.  
  54. extern pascal ComponentResult ADD_ALM_BASENAME(CompareSetting) 
  55.         (ALM_GLOBALS() ADD_ALM_COMMA Handle setting1, Handle setting2, Boolean* equal);
  56.  
  57. extern pascal ComponentResult ADD_ALM_BASENAME(EditSetting) 
  58.         (ALM_GLOBALS() ADD_ALM_COMMA Handle setting);
  59.  
  60. extern pascal ComponentResult ADD_ALM_BASENAME(DescribeSettings) 
  61.         (ALM_GLOBALS() ADD_ALM_COMMA Handle setting, CharsHandle text);
  62.  
  63. extern pascal ComponentResult ADD_ALM_BASENAME(DescribeError) 
  64.         (ALM_GLOBALS() ADD_ALM_COMMA OSErr lastErr, Str255 errStr);
  65.  
  66. extern pascal ComponentResult ADD_ALM_BASENAME(ImportExport) 
  67.         (ALM_GLOBALS() ADD_ALM_COMMA Boolean import, Handle setting, short resRefNum);
  68.  
  69. extern pascal ComponentResult ADD_ALM_BASENAME(GetScriptInfo) 
  70.         (ALM_GLOBALS() ADD_ALM_COMMA ALMScriptMgrInfo* info);
  71.  
  72. extern pascal ComponentResult ADD_ALM_BASENAME(GetInfo) 
  73.         (ALM_GLOBALS() ADD_ALM_COMMA CharsHandle* text, STHandle* style, ModalFilterUPP filter);
  74.  
  75.  
  76. /* selectors for component calls */
  77. enum {
  78.     kALMGetCurrentSelect = 0x0000,
  79.     kALMSetCurrentSelect = 0x0001,
  80.     kALMCompareSettingSelect = 0x0002,
  81.     kALMEditSettingSelect = 0x0003,
  82.     kALMDescribeSettingsSelect = 0x0004,
  83.     kALMDescribeErrorSelect = 0x0005,
  84.     kALMImportExportSelect = 0x0006,
  85.     kALMGetScriptInfoSelect = 0x0007,
  86.     kALMGetInfoSelect = 0x0008
  87. };
  88.  
  89. #endif /* __LOCATIONMANAGER_K__ */
  90.  
  91.